package com.zyark.service.impl;

import com.zyark.domain.SysResource;
import com.zyark.service.SysResourceService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * Created by ron on 17-4-6.
 */
@Service
public class SysResourceServiceImpl extends BaseServiceIpml<SysResource> implements SysResourceService {

    @Override
    public List<SysResource> findRootMenus(){
        Example sysResourceExample = new Example(SysResource.class);
        sysResourceExample.or().andEqualTo("parentId",1L);
        sysResourceExample.setOrderByClause("priority");
        return mapper.selectByExample(sysResourceExample);
    }
}
